package bean;

/**
 * @auther hewenhui
 * @see <a href="hetp://www.codingmaster.com> java </a>
 */
public class OrderDetails extends Product{
    private int ODid;// 主键
    private int Oid;// 所属订单的id 外键
    private int count; //数量
    private double all_price; // 单品总价格

    public OrderDetails() {

    }

    public OrderDetails(Product product,int count) {
        super(product);
        this.count = count;
        this.all_price = product.getPrice()*count;
    }

    @Override
    public String toString() {
        return "OrderDetails{" +
                "ODid=" + ODid +
                ", Oid=" + Oid +
                ", Pid=" + Pid +
                ", count=" + count +
                ", price=" + price +
                '}';
    }

    public int getODid() {
        return ODid;
    }

    public void setODid(int ODid) {
        this.ODid = ODid;
    }

    public int getOid() {
        return Oid;
    }

    public void setOid(int oid) {
        Oid = oid;
    }

//    public int getPid() {
//        return Pid;
//    }
//
//    public void setPid(int pid) {
//        Pid = pid;
//    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
}
